package com.itheima.web.controller;
/*
 *FileName: LocationController
 *Created Date:2021/3/2 16:43
 *Developers: Mr.Seven
 */


import com.itheima.web.service.LocationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * Mr.Seven的基操
 */
@RestController
@RequestMapping("/location")
public class LocationController {

    @Autowired
    private LocationService locationService;

    /**
     * 高德地图
     * @param userId 用户id
     * @return
     */
    @GetMapping("{userId}")
    public ResponseEntity findLocation(@PathVariable("userId") Integer userId) {
        return locationService.findLocation(userId);
    }
}
